<?php
$this->pageTitle=Yii::app()->name . ' - 用户注册';
$this->breadcrumbs=array(
	'注册',
);
?>

<h1>用户注册</h1>


<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'reg-form',
	'enableAjaxValidation'=>true,
)); ?>

	<p class="note">标记<span class="required">*</span> 为必填项.</p>
	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'user_login'); ?>
		<?php echo $form->textField($model,'user_login'); ?>
		<?php echo $form->error($model,'user_login'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'user_password'); ?>
		<?php echo $form->passwordField($model,'user_password'); ?>
		<?php echo $form->error($model,'user_password'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'verifyPassword'); ?>
		<?php echo $form->passwordField($model,'verifyPassword'); ?>
		<?php echo $form->error($model,'verifyPassword'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'user_name'); ?>
		<?php echo $form->textField($model,'user_name'); ?>
		<?php echo $form->error($model,'user_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'user_role'); ?>
		<?php echo $form->dropDownList($model,'user_role',$model->getUserRole()); ?>
		<?php echo $form->error($model,'user_role'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'user_email'); ?>
		<?php echo $form->textField($model,'user_email'); ?>
		<?php echo $form->error($model,'user_email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'verifyCode'); ?>
		<div>
		<?php $this->widget('CCaptcha',array('buttonLabel'=>'刷新','buttonType'=>'link','clickableImage'=>'true')); ?>
		<?php echo $form->textField($model,'verifyCode'); ?>
		<?php echo $form->error($model,'verifyCode'); ?>
		</div>
		<div class="hint">请正确填写图片中的字母。</div>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('注册'); ?><br />
		<?php echo CHtml::link('忘记密码',array('Users/recovery')); ?>&nbsp;|&nbsp;
		<?php echo CHtml::link('帮助',array('site/page','view'=>'help')); ?></a>
	</div>

<?php $this->endWidget(); ?>
</div>
<!-- form -->
